// DeleteUser.js
import React from 'react';
import { Modal, Button } from 'antd';

function DeleteUser({ visible, onCancel, onConfirm, userId }) {
  return (
    <Modal
      title="确认删除"
      visible={visible}
      onCancel={onCancel}
      footer={[
        <Button key="cancel" onClick={onCancel}>
          取消
        </Button>,
        <Button key="confirm" type="primary" danger onClick={() => onConfirm(userId)}>
          确认删除
        </Button>
      ]}
    >
      您确定要删除用户 {userId} 吗？
    </Modal>
  );
}

export default DeleteUser;
